const core = {
  state: () => {
    return {
      breadList: [],
      activeNav: 0,
      isPlay: false,
    };
  },
  mutations: {
    //设置面包屑
    setBread(state, { toBreadName, father }) {
      if (father) state.breadList.push(father);
      state.breadList.push(toBreadName);
    },
    //清除面包屑
    clearBreadLIst(state) {
      state.breadList = [];
    },
    //设置激活的标题
    setActiveNav(state, activeNav) {
      state.activeNav = activeNav;
    },
    //切换播放
    changePlay(state, isPlay) {
      console.log(isPlay);
      state.isPlay = isPlay;
    },
  },
  actions: {},
  getters: {},
};

export default core;
